home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / filutil / mdf130.zip / MDF_ENG.DOC < prev    next >
Text File  |  1995-01-12  |  11KB  |  352 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                                   MDIFF  -  MPATCH
  12.                                     Release  1.3
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.       Simple but complete program to produce and apply patches to your programs
  27.                                    and data files.
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.                                   English version.
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.                   (C) 1994/95 Maurizio Giunti - All rights reserved
  52.  
  53.  
  54.  
  55.  
  56.  
  57.      0.INDEX
  58.  
  59.  
  60.      0.INDEX                                                                  2
  61.  
  62.  
  63.      1.WHY?                                                                   3
  64.  
  65.  
  66.      2.WHAT MDIFF-MPATCH DO?                                                  3
  67.  
  68.  
  69.      3.DOS AND OS/2                                                           3
  70.  
  71.  
  72.      4.LIMITS                                                                 3
  73.  
  74.  
  75.      5.MDIFF - MDIFF2                                                         3
  76.  
  77.  
  78.      6.MPATCH - MPATCH2                                                       4
  79.  
  80.  
  81.      7.ADVICES                                                                4
  82.  
  83.  
  84.      8.RIGHTS                                                                 5
  85.  
  86.  
  87.      9.WARRANTY                                                               5
  88.  
  89.  
  90.      10.LIBRARIES TO APPLY PATCHES                                            5
  91.  
  92.  
  93.      11.HOW TO REGISTER                                                       5
  94.  
  95.  
  96.      12.ACKNOWLEDGEMENTS                                                      6
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.                                                                               2
  112.  
  113.  
  114.  
  115.  
  116.  
  117.      1.WHY?
  118.      A few month ago I was updating a program of mine: the  commpressed packet
  119.      was about 200 Kbytes I thought it was better to use a patch,  but I could
  120.      not find a program of my satisfaction among the patch makers/appliers. In
  121.      addition I could not trace a program that could run under DOS and OS/2.
  122.      I decided to make my own patch software and.....here it is ! 8-)
  123.  
  124.  
  125.  
  126.      2.WHAT MDIFF-MPATCH DO?
  127.      MDIFF creates a binary difference between two files. With MPATCH  and the
  128.      older file you can create a  new file using the difference file.  What is
  129.      the advantage? Usually the difference file is smaller and  therefore more
  130.      suitable for distribution, especially by modem.
  131.  
  132.  
  133.  
  134.      3.DOS AND OS/2
  135.      In the distribution packet  you will find 4  executable files, 2 for  Dos
  136.      and 2 for OS/2 32bits. There is no difference in functions and use of the
  137.      different versions. Difference files produced with  MDIFF for Dos can  be
  138.      used with  MPATCH for OS/2 and vice-versa.
  139.  
  140.  
  141.  
  142.      4.LIMITS
  143.      MDIFF can't work  on files  greater than 16  Mbytes. There  are no  other
  144.      limits to MDIFF's work.
  145.  
  146.  
  147.  
  148.      5.MDIFF - MDIFF2
  149.      MDIFF compares  2 files  and stores  the differences  between  them in  a
  150.      difference file. This is the command line  syntax:
  151.  
  152.        MDIFF [-C<c>] [-R<r>] [-F<f>] [-S] [-Z] <OldFile> <NewFile> [<MDFfile>]
  153.  
  154.      <OldFile> is the name of the older file, <NewFile> is the name of the new
  155.      file. If you wish you can specify  the  name of the difference  file that
  156.      MDIFF will produce, otherwise MDIFF will  create a file with the name  of
  157.      the  new file but with the extension ".MDF".
  158.      To search differences between files, MDIFF  use a base string of  defined
  159.      length named Chunk. The Chunk length is  by default 16 bytes, but you can
  160.      change it, in the range 4-256, with the -C switch followed by the desired
  161.      length.
  162.      When MDIFF loses the synchronism between the two files being compared, it
  163.      scans the  older file  searching the   current  chunk.  This scansion  is
  164.      executed, by default, in a range of  8 blocks of 512 bytes each.  You can
  165.      change the number of the blocks  scanned, in the range 1-16, with  the -R
  166.      switch followed by the desired number of  blocks.
  167.      If this  search fails,  MDIFF tries  to force  synchronization through  a
  168.      large range search. This range is defined as 1/16 of the old file lenght,
  169.      but you can change it by the -F switch on the command line.
  170.  
  171.                                                                               3
  172.  
  173.  
  174.  
  175.  
  176.      If you specify -S switch, MDIFF  will provide some information about  the
  177.      composition of the difference file.
  178.      Moreover you can add to the difference file produced a short comment (max
  179.      2 Kbytes) to display when the patch is applied, with the -Z switch. MDIFF
  180.      gets the comment  from standard  input, so you  can type  it directly  or
  181.      redirect it from a file with the "<" command.
  182.  
  183.  
  184.  
  185.      6.MPATCH - MPATCH2
  186.      With the old  file and  the .MDF file  you can  rebuild the  new file  by
  187.      running MPATCH. This is the command line  syntax:
  188.  
  189.                       MPATCH <MDFfile> [<OldFile>] [<NewFile>]
  190.  
  191.      MPATCH needs  only  the name  of  the  mdf file  (<MDFfile>)  because  it
  192.      contains the names of the other  2 files, but  it's possible  to override
  193.      these names specifying the desired names on the command line. MPATCH does
  194.      not have any switches.
  195.      If there  are  errors  during  the  patch  applying,  MPATCH  returns  an
  196.      errorlevel as follows:
  197.          0    "OK!"
  198.          1    "Out of memory !"
  199.          2    "Can't open MDF file !"
  200.          3    "Invalid MDF file !"
  201.          4    "MDF file version mismatch !"
  202.          5    "UNREGISTERED !"
  203.          6    "Bad or incorrect OLD file !"
  204.          7    "Can't open OLD file !"
  205.          8    "Can't create NEW file !"
  206.          9    "General failure: NEW file corrupted !"
  207.         10    "OLD and NEW can't be the same file !"
  208.  
  209.  
  210.  
  211.      7.ADVICES
  212.      The best method to build  a difference file, is  to search the chunks  of
  213.      the new file in the entire older file, but this  is a very slow way to do
  214.      !
  215.      MDIFF's algorithm tries to give a  small diff file in the faster  way; so
  216.      you are sometimes required to tune the work  parameters with  the command
  217.      line switches.
  218.      Let's look at some typical situations:
  219.        Very similar files: use a  large chunk (32, 64  or more) to reduce  the     1. 
  220.        size of  the diff  file, in  particular if  the files  contain text  or
  221.        archives.
  222.      2.        Text files: try to use a  chunk size of 32,  sometimes it is better  to
  223.        turn the forced sync off or reduce its range by the -F switch.
  224.      3.        Very large executable: try to use  a larger resync range (16 or  more),
  225.        with the -R switch.
  226.      Remember: MDIFF  can't  make  miracles!  If  the  two  files  are  really
  227.      different, the patch will result very  large. In this situation you  must
  228.      distribute the entire new file. MDIFF  is useful only when the number  of
  229.      changes is limited.
  230.  
  231.                                                                               4
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.      8.RIGHTS
  239.      This software belongs to Shareware programs: anyone can freely distribute
  240.      and use it for a trial period of 15 days.  After this  period, users that
  241.      continue to use it must register  their copy by sending the  registration
  242.      fee to the  author, Maurizio Giunti.
  243.      The registered users will receive a "registration key".
  244.      Tis sofware can  be freely distributed  at no cost,  except for  eventual
  245.      copy and/or shipping expensee. It is imperative anyway that  the ORIGINAL
  246.      PACKET is distributed without any modification WHATSOEVER.
  247.      There is an  exception: you  can distribute  MPATCH.EXE (or  MPATCH2.EXE)
  248.      with one or more *.MDF files produced with a REGISTERED copy of MDIFF.
  249.  
  250.  
  251.  
  252.      9.WARRANTY
  253.      The only warranty that  comes with this software  is that it will  occupy
  254.      disk space. I absolutely can NOT warrant that it will perfectly  work, or
  255.      that it will be your problems' solution.
  256.      Nevertheless, it is not a virus and does not contain (unless  infected or
  257.      modified after  the   compilation) Trojan-horses,  backdoors and  similar
  258.      tricky garbage.  In any  case, the  author is  not responsible   for  any
  259.      damage, moral or material, direct or indirect, derived from its use.
  260.  
  261.  
  262.  
  263.      10.LIBRARIES TO APPLY PATCHES
  264.      Inside this distribution  packet you  will find some  libraries for  Dos,
  265.      Windows and OS/2  32bits, to build  your own   programs to apply  patches
  266.      produced by MDIFF.
  267.      These libraries will work ONLY with *.MDF files produced by  a REGISTERED
  268.      copy of MDIFF.
  269.      The distribution packet  is complete with  sample sources in  C, C++  and
  270.      VisualBasic and all the needed  documentation.
  271.  
  272.  
  273.  
  274.      11.HOW TO REGISTER
  275.      The individual registration key costs Italian Liras 25,000 (approx U.S. $
  276.      16.-). Site licenses available on request.
  277.      The key is valid for both DOS and OS/2 version of the software.
  278.      The registration key will be sent by mail. If explicity requested, it can
  279.      also be sent via Internet e-mail.
  280.      The registration fee can be paid according to your preference, by check
  281.      or postal order (in Italy) or International Money Order (I.M.O.), from
  282.      abroad, payable to:
  283.  
  284.                                    Maurizio Giunti
  285.                                 Via G.B. Foggini, 24
  286.                                  50142 Firenze (FI)
  287.                                         ITALY
  288.  
  289.      It is better to indicate on  the order the name  of the program you  want
  290.      to register, your name, address and FAX  number or e-mail  address (where
  291.                                                                               5
  292.  
  293.  
  294.  
  295.  
  296.      available). For  short notes,  use the  appropriate space  on the  postal
  297.      order (if present), or send an e-mail to Maurizio Giunti at:
  298.  
  299.                                 Fidonet: 2:332/102.3
  300.  
  301.                           Internet: giunti@stat.ds.unifi.it
  302.  
  303.  
  304.  
  305.      12.ACKNOWLEDGEMENTS
  306.      I'd like to thank all  those who helped me  to develop this software  and
  307.      its documentation  and all  those  who   helped  me in  beta-testing.  In
  308.      alphabetical order:
  309.  
  310.                                    Andrea Baitelli
  311.  
  312.                                     Silvia Borri
  313.  
  314.                                     Filippo Dini
  315.  
  316.                                  Fabrizio Fioravanti
  317.  
  318.                                  Cristiano Guidoccio
  319.  
  320.                                 Giovanni Lopes Pegna
  321.  
  322.                                   Marco Maccaferri
  323.  
  324.                                   Marco Menichelli
  325.  
  326.                                    Giuseppe Scarpi
  327.  
  328.                                    Toni Tatafiore
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.                                                                               6
  352.